package com.dily.study.demo.thread;

/**
 * Date: 2022-08-09 星期二
 * Time: 17:29
 * Author: Dily_Su
 * Remark:
 */
public class TestJoin {
    public static void main(String[] args) throws InterruptedException {
        // 启动我们的线程
        TestRunnable testRunnable = new TestRunnable();
        Thread thread = new Thread(testRunnable);
        thread.start();
        Thread.sleep(10);

        for (int i = 0; i < 20; i++) {

            if (i==10){
                thread.join();
            }
            System.out.println("main");
        }

    }
}
